package com.atguigu.gmall.list.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.list.SearchParam;
import com.atguigu.gmall.model.list.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Mamba
 * @version 1.0
 * @Description
 * @date 2021/1/1 19:09
 */
@FeignClient(name = "service-list")
public interface ListFeignClient {

    //更新热度
    @GetMapping("api/list/hotScore/{skuId}")
    public Result hotScore(@PathVariable Long skuId);

    //开始搜索json串保存在请求体中 GET URL
    @PostMapping("api/list")
    public SearchResponseVo list(@RequestBody SearchParam searchParam);
}
